<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <title>Reference</title>
    <link rel="stylesheet" href="../luadoc.css" type="text/css" />
	<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>

<body>
<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->

<div id="main">

<div id="navigation">


<h1>LuaDoc</h1>
<ul>
	
	<li><a href="../index.html">Index</a></li>
	
</ul>


<!-- Module list -->



<!-- File list -->

<h1>Files</h1>
<ul>

	<li>
		<a href="../files/Compiler.html">Compiler.lua</a>
	</li>

	<li>
		<a href="../files/Editor.html">Editor.lua</a>
	</li>

	<li>
		<a href="../files/Instance.html">Instance.lua</a>
	</li>

	<li>
		<a href="../files/Libraries.html">Libraries.lua</a>
	</li>

	<li><strong>Permissions.lua</strong></li>
	
	<li>
		<a href="../files/Preprocessor.html">Preprocessor.lua</a>
	</li>

	<li>
		<a href="../files/SFLib.html">SFLib.lua</a>
	</li>

	<li>
		<a href="../files/libs_cl/ents.html">libs_cl/ents.lua</a>
	</li>

	<li>
		<a href="../files/libs_cl/screen.html">libs_cl/screen.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/builtins.html">libs_sh/builtins.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/files.html">libs_sh/files.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/find.html">libs_sh/find.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/time.html">libs_sh/time.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/trace.html">libs_sh/trace.lua</a>
	</li>

	<li>
		<a href="../files/libs_sv/ents.html">libs_sv/ents.lua</a>
	</li>

	<li>
		<a href="../files/libs_sv/wire.html">libs_sv/wire.lua</a>
	</li>

	<li>
		<a href="../files/reload.html">reload.lua</a>
	</li>

</ul>






</div> <!-- id="navigation" -->

<div id="content">

<h1>File <code>Permissions.lua</code></h1>







<h2>Functions</h2>
<table class="function_list">

	<tr>
	<td class="name" nowrap><a href="#SF.Permissions:assign">SF.Permissions:assign</a>&nbsp;(instance)</td>
	<td class="summary">Called to assign the permissions manager to an Instance.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Permissions:checkPermission">SF.Permissions:checkPermission</a>&nbsp;(name)</td>
	<td class="summary">Checks a permission </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Permissions:getPermissionData">SF.Permissions:getPermissionData</a>&nbsp;(name)</td>
	<td class="summary">Returns data about a permission </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Permissions:registerPermission">SF.Permissions:registerPermission</a>&nbsp;(tbl)</td>
	<td class="summary">Creates a new permission </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Permissions:requestPermissions">SF.Permissions:requestPermissions</a>&nbsp;(permissions)</td>
	<td class="summary">Requests a set of permissions.</td>
	</tr>

</table>




<h2>Tables</h2>
<table class="table_list">

	<tr>
	<td class="name" nowrap><a href="#Permission">Permission</a></td>
	<td class="summary">Permission format </td>
	</tr>

</table>



<br/>
<br/>




<h2><a name="functions"></a>Functions</h2>
<dl class="function">



<dt><a name="SF.Permissions:assign"></a><strong>SF.Permissions:assign</strong>&nbsp;(instance)</dt>
<dd>
Called to assign the permissions manager to an Instance. The default implementation sets self.instance to the passed argument.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>instance</em></code>: 
	</li>
	
</ul>








</dd>




<dt><a name="SF.Permissions:checkPermission"></a><strong>SF.Permissions:checkPermission</strong>&nbsp;(name)</dt>
<dd>
Checks a permission


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>name</em></code>: The permission name
	</li>
	
</ul>






<h3>Return value:</h3>
<ul>True to allow</ul>



</dd>




<dt><a name="SF.Permissions:getPermissionData"></a><strong>SF.Permissions:getPermissionData</strong>&nbsp;(name)</dt>
<dd>
Returns data about a permission


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>name</em></code>: The name of the permission
	</li>
	
</ul>






<h3>Return value:</h3>
<ul>The permission data table</ul>



</dd>




<dt><a name="SF.Permissions:registerPermission"></a><strong>SF.Permissions:registerPermission</strong>&nbsp;(tbl)</dt>
<dd>
Creates a new permission


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>tbl</em></code>: The permission data to register
	</li>
	
</ul>








</dd>




<dt><a name="SF.Permissions:requestPermissions"></a><strong>SF.Permissions:requestPermissions</strong>&nbsp;(permissions)</dt>
<dd>
Requests a set of permissions. The default implementation of this does nothing, but implementors can use this to change the permissions of a script dynamically


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>permissions</em></code>: A list of permission names to request
	</li>
	
</ul>








</dd>


</dl>




<h2><a name="tables"></a>Tables</h2>
<dl class="table">

<dt><a name="Permission"></a><strong>Permission</strong></dt>
<dd>Permission format<br /><br />


<h3>Fields:</h3>
<ul>
	
	<li>
	  <code><em>name</em></code>: The name of the permission
	</li>
	
	<li>
	  <code><em>desc</em></code>: The description of the permission.
	</li>
	
	<li>
	  <code><em>level</em></code>: The abusability of the permission. 0 = low (print to console), 1 = normal (modify entities), 2 = high (run arbitrary lua)
	</li>
	
	<li>
	  <code><em>value</em></code>: Boolean. True to allow, false to deny
	</li>
	
</ul>


</dd>


</dl>




</div> <!-- id="content" -->

</div> <!-- id="main" -->

<div id="about">
	<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->

</div> <!-- id="container" -->	
</body>
</html>
